home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / music / dtmf_rtd.zip / DTMF486D.DOC < prev    next >
Text File  |  1995-01-16  |  14KB  |  332 lines

  1.                ╔═══════════════════════════════════════════════════╗
  2.                ║  ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒  ║
  3.                ║  ▒                                             ▒  ║
  4.                ║  ▒  DTMF Real-Time Decoder -- 486 DEMO Version ▒  ║
  5.                ║  ▒                                             ▒  ║
  6.                ║  ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒  ║
  7.                ║                                                   ║
  8.                ║───────────────────────────────────────────────────║
  9.                ║    Shima-nized Advanced Utilities - J.M. Shima    ║
  10.                ║         Copyright (c) 1994-95 by James Shima      ║
  11.                ║                 All Rights Reserved               ║
  12.                ║                                                   ║
  13.                ╚═══════════════════════════════════════════════════╝
  14.  
  15.  
  16.                    ▐▐▐▐   R E F E R E N C E   M A N U A L   ▐▐▐▐
  17.  
  18.  
  19.  
  20.  
  21.  
  22.              » Type DTMF486D at the DOS prompt for a summary of options «
  23.  
  24.  
  25.  
  26. INTRODUCTION
  27. ▀▀▀▀▀▀▀▀▀▀▀▀
  28.  
  29. * This program functions as a real-time DTMF decoder.  One application
  30.   where DTMF tones are used is in the standard American telephone dialing
  31.   system.  The standard DTMF tones represent the numbers 1,2,3,4,5,6,7,
  32.   8,9,0,*,# on a standard keypad interface.  The four reserved DTMF tones
  33.   representing A,B,C,D are supported in the REGISTERED version.
  34.  
  35. * This program is capable of decoding DTMF tones from a Soundblaster
  36.   Version 1.0 - 2.0, Soundblaster Pro, or TRUE Soundblaster compatible
  37.   (16-bit or 8-bit) sound card in real-time.  Soundblaster 16 support
  38.   has been reported to work but is fully untested at this point.
  39.  
  40. * This 486 version is geared toward persons with a 486DX PC or better.
  41.   This version can be used by slower machines, but results will
  42.   be error prone due to the non real-time processing.
  43.  
  44. * If your PC DOES NOT perform equivalent to a 486DX-25 or better,
  45.   a quasi real-time switch is supported.  However, due to the nature
  46.   of real-time processing, this means data will be lost and results
  47.   may vary from system to system.
  48.  
  49. * The Soundblaster or compatible sound card MUST be connected to port
  50.   address 220h and using DMA 1 (the factory settings).
  51.  
  52. * The input to the Soundblaster mic or line input can originate
  53.   from any external communication device that supplies DTMF tones
  54.   to the sound card.
  55.  
  56. * This program accepts COMMAND-LINE ARGUMENTS that are passed to the
  57.   DTMF decoder.
  58.  
  59. * For a list of the arguments, type DTMF486D at the DOS prompt.
  60.  
  61. * The DEMO only decodes a maximum of 5 numbers.  Interested
  62.   persons can receive the REGISTERED version with no limitations.
  63.  
  64.  
  65. SOFTWARE LICENSE
  66. ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  67.  
  68. The 486 DEMO version of the DTMF real-time decoder is shareware, and is free
  69. for personal use only.  This is true as long as the DEMO is not alterted
  70. in any fashion.  Registered users will receive the REGISTERED version of
  71. the DTMF decoder and will receive documentation stating such.
  72.  
  73.  
  74. The author offers no warranties on this program.  This program is provided
  75. as is.  Use this program at your own risk.  I assume no responsibility in your
  76. actions while you are using this program.  The author is not liable for any
  77. damage caused to your computer while you are using this program.  Using
  78. the program is your compliance to this statement and the license.
  79.  
  80.  
  81. COMMAND-LINE ARGUMENT SCREEN
  82. ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  83.  
  84. The program argument screen should look as follows:
  85.  
  86. Real-Time Dual-Tone Multi-Frequency Decoder, 486 DEMO Version
  87. Shima-nized Advanced Utilities (c) 1994-95 - J.M. Shima
  88.  
  89. USAGE: DTMF486D  <sample_rate>  switches:[ <-t>number <-r>]
  90.  
  91. Notes:  <sample_rate> = rate of incoming samples in Hz. The range
  92.                         is 4000 < fs < 12000 for DTMF decoding.
  93.                         The RECOMMENDED value is 4000 Hz for real-time
  94.                         decoding.
  95.  
  96. ** Sound card must be Soundblaster 1.0 - 2.0, Pro, or Soundblaster
  97. ** compatible connected to port 220h using DMA 1 (The factory settings).
  98.  
  99. Switches: -t = Defines the S/N threshold value (in dB) that DTMF tones
  100.                must surpass for proper detection.
  101.                The threshold S/N value can be any real, non-negative number.
  102.                DEFAULT value is 20 dB.
  103.           -r = Enable real-time mode.  Use this for a 486DX-25 machine or up.
  104.                Otherwise, use quasi real-time mode which is probable to
  105.                give inconsistent results.  Real-time mode is OFF by DEFAULT.
  106.  
  107.  
  108. EXPLANATION OF COMMAND-LINE ARGUMENTS
  109. ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  110.  
  111. <sample_rate>   -->  Input sample rate.  Must be in the range of 4000 to
  112.                      12000 Hertz (Hz).  For DTMF detection, it is HIGHLY
  113.                      RECOMMENDED THAT YOU USE 4000 Hz for real-time
  114.                      processing.  However, testing indicated that a
  115.                      486DX-66 could perform real time processing with a
  116.                      8000 Hz sample rate.
  117.  
  118. Switches:
  119. ════════
  120.  
  121.  -t<number>    -->  The threshold that the DTMF tones must exceed over the
  122.                     noise floor for detection (in dB).  Typically, strong
  123.                     DTMF tones will be 20-40 dB stronger than the noise
  124.                     in the signal.  However, noisy signals lower this
  125.                     signal-to-noise (S/N) ratio.  The threshold parameter
  126.                     allows the user to set the S/N threshold for detection
  127.                     of noisier or corrupted DTMF tones.
  128.  
  129.                     * NOTE:  If nothing is entered, then the DEFAULT S/N
  130.                              threshold value is 20dB, which is a figure
  131.                              of merit for normal tones.
  132.  
  133.                     One must realize that dB is a logarithmic scale
  134.                     of signal gain through the equation:
  135.                     dB = 20 * log(signal gain).
  136.                     Thus, a large signal gain represents a small
  137.                     increase in the dB number (i.e. 40dB is a 100x
  138.                     signal gain, while 20dB is a 10x signal gain).
  139.  
  140.  -r            -->  Enables TRUE real-time processing mode.  Include this
  141.                     switch if your system is capable of handling the
  142.                     flow rate of data.  Rule of thumb:  A 486DX-33 can
  143.                     probably handle real-time.
  144.  
  145.                     ** NOTE:  Results will VARY from system to system.
  146.  
  147.                     By default, a quasi real-time process is included
  148.                     for slower machines.  Obviously, this means data will
  149.                     be lost due to computational overhead, put I have
  150.                     tried to STRATEGICALLY MINIMIZE the effects of this.
  151.  
  152.  
  153.  
  154. EXAMPLES OF RUNNING DTMF486D
  155. ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  156.  
  157. * Program start:  Run the program by typing the executable name.
  158. * Program end:  The program ENDS when ANY key is hit during decoding!
  159.  
  160.  
  161. DTMF486D 4000            -->   Input sample rate is 4000 Hz.  Quasi real-time
  162.                                mode is enabled by default.  Input S/N
  163.                                threshold defaults to 20dB.
  164.  
  165. DTMF486D 4000 -t25       -->   Input sample rate is 4000 Hz.  The input
  166.                                S/N threshold is set to 25dB.  Quasi real-time
  167.                                mode is enabled.
  168.  
  169. DTMF486D 4000 -r -t15    -->   Input sample rate is 4000 Hz.  The S/N
  170.                                threshold is set to 15dB.  Real-time mode
  171.                                for fast machines is enabled.
  172.  
  173.  
  174. IMPORTANT NOTES
  175. ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  176.  
  177. Since this is a real-time piece of software, certain rules must be followed
  178. for proper use.
  179.  
  180. Sampling rate:
  181.                 Increasing the sampling rate means that samples are ready
  182.                 faster.  Thus, the computer has less time to do what
  183.                 is has to before it has to fetch more samples.  So,
  184.                 one must make the sample rate as low as it can go
  185.                 and still represent the maximum frequency in the signal.
  186.                 For DTMF tones, this minimum sampling rate is 4000 Hz,
  187.                 (due to Nyquist theorem).  IT BEHOOVES YOU to use this rate.
  188.                 Sampling at a rate higher than necessary gains you
  189.                 nothing, but INCREASES your computational overhead. For real-
  190.                 time operation, make your sampling rate as low as you can
  191.                without violating Nyquist theorem (2x the maximum freq.
  192.                 in the signal).  So, for all practical purposes, use
  193.                 4000 Hz as your sampling rate.
  194.  
  195. Real-time processing:
  196.                 If your system cannot handle real-time processing, that
  197.                 means data will be lost.  While your system is processing
  198.                 the old data, it doesn't have time to retrieve the new
  199.                 data coming in.  This new data is discarded and the
  200.                 computer picks up fresh data when it's done with its
  201.                 current task.  Thus, results are inconsistent when real-time
  202.                 processing cannot be done.  The probability of detecting
  203.                 a given tone depends on where your computer is in its
  204.                 processing stage.  You can see that its nearly impossible
  205.                 to debug whether or not real-time processing is happening
  206.                 or not.  On top of this, your CPU takes care of many other
  207.                 housekeeping tasks.  Therefore, I have deemed "real-time"
  208.                 on the fact that a DTMF tone does not go undetected as given
  209.                 in the DTMF standards.  Closely spaced tones will be detected
  210.                 in real-time if your system can run the code in real time.
  211.  
  212.                 However, you can also decode all DTMF tones if there
  213.                 is enough time between tones and your computer works
  214.                 fast enough so to extract some data from each tone.
  215.                 In this case, the decoder is not working in real time
  216.                 but is able to extract data since a tone exists for
  217.                 a longer amount of time than it takes to perform a detection.
  218.                 In other words, longer DTMF tones are better detected
  219.                 in quasi real-time mode.  DTMF tones invoked by humans
  220.                 are very long compared to the time it takes your computer
  221.                 to detect them, so in quasi-real time mode you should
  222.                 be able to get good results.  This is why probability
  223.                 governs the detection process in the quasi real-time case.
  224.  
  225.                 Noisy DTMF tones are also error ridden since the processing
  226.                 window is so small no noise immunity algorithm can be
  227.                 implemented.  Note that non-pure tones may not be detected
  228.                 properly!
  229.  
  230.  
  231.  
  232. INCLUDED FILES
  233. ▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  234.  
  235. DTMF486D.EXE   -->  DTMF real-time decoder, DEMO version.
  236. DTMF486D.DOC   -->  This file.
  237. REGISTER.DOC   -->  Registration form.
  238.  
  239.  
  240.  
  241. REGISTRATION
  242. ▀▀▀▀▀▀▀▀▀▀▀▀
  243.  
  244. ** For registration, please fill out REGISTER.DOC and see the DEMO screen.
  245.    Specify media dispersement.
  246.  
  247. The REGISTERED version of this program allows unlimited decoding of numbers,
  248. and offers other features including:
  249.  
  250.  
  251.  
  252. 1) Automatic logging of the resulting decoded numbers to a log file.
  253.    The session is also time and date stamped.
  254.  
  255. 2) Time monitoring switch.  Allows deciphering of incoming streams of
  256.    numbers if tone activity is not detected for a set number of seconds.
  257.  
  258. 3) Supports the extended DTMF tones A,B,C,D.
  259.  
  260. 4) REGISTERED users will also receive a DTMF generator program.  This is
  261.    a DTMF tone generator which allows you to create any DTMF sequence
  262.    you wish.  The program allows you to specify a DTMF number sequence,
  263.    the sampling rate, and how long you want the pulses to be (in samples).
  264.  
  265.  
  266.  
  267. TESTING
  268. ▀▀▀▀▀▀▀
  269.  
  270. I have thoroughly tested this code and I am not responsible for any mishaps
  271. that may happen when run on your computer.
  272.  
  273. SOUND CARDS TESTED:
  274.  
  275. Aztec Sound Galaxy 16 bit
  276. Sound Blaster 8 bit
  277. Sound Blaster ASP 16
  278. Generic SB fully compatible 16 bit
  279. Sound Blaster 16 VE *
  280.  
  281. * Some problems with the SB 16 VE have been reported and verified.
  282.   Mic and line inputs for the SB 16 VE gave spurious results.  No
  283.   explanation for this hardware problem has been determined.
  284.  
  285.  
  286. TESTING PLATFORMS:
  287.  
  288. 1)  The code was tested on an IBM compatible 25MHz 486DX Cyrix upgrade PC
  289.     with a Soundblaster Version 1.5 sound card running DOS 5.0.  Tones
  290.     were recorded onto a cassette tape and played into a microphone which
  291.     was connected to the mic input of the Soundblaster card.  It was able
  292.     to run in quasi real-time mode with a 4000 Hz sample rate and decoded
  293.     numbers with approximately 90% accuracy.  Real-time mode was
  294.     unachievable but gave similar results.  Using this test vector data,
  295.     normal dialing was decoded 95% of the time.  Burst dialing was
  296.     decoded 95% of the time.  Noisy tones gave inconsistent results.
  297.  
  298.     ** NOTE: All captured numbers were correctly decoded, the errors
  299.     stemmed from the fact that real-time decoding was not possible!
  300.  
  301.  
  302.  
  303. 2)  The code was also tested on a 486DX2-66 with an Aztec Sound
  304.     Galaxy 16-bit Soundblaster compatible sound card.  The code was ABLE
  305.     to run in REAL-TIME on a 486DX2-66 with sample rates of 4000 Hz and
  306.     8000 Hz!!  Using recorded test vector data, DTMF decoding was 100%
  307.     accurate!  Normal and burst dialing were decoded 100% of the time.
  308.     Again, noisy tones were inconsistent due to the streamlined algorithm.
  309.  
  310. Every action has been taken to ensure an error-free program.
  311.  
  312. Note, incompatibilities may stem from hardware deviations.
  313. For optimal performance, DO NOT launch this program while running under
  314. Microsoft Windows.
  315.  
  316.  
  317. For more information,
  318.  
  319. EMAIL:  shima@eel.ufl.edu
  320.  
  321. US MAIL:        J.M. Shima
  322.           3800 SW 34th St.  Apt. J-80
  323.            Gainesville, FL  32608
  324.  
  325.  
  326. TRADEMARKS
  327. ▀▀▀▀▀▀▀▀▀▀
  328.  
  329. Soundblaster is a trademark of Creative Lab's Inc.
  330. Microsoft Windows and DOS is a trademark of Microsoft.
  331.  
  332.